package com.iris.live.services.data.models;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * @author: wangzhenyan
 * date: 2017/11/7 11:00
 */
@Entity
@Table(name = "t_boutique_call_check", schema = "iris_dch_dev", catalog = "")
public class TBoutiqueCallCheckModel {
    private Integer id;
    private String quotaId;
    private String contractNum;
    private String checkStatus;
    private String scName;
    private String permit;
    private Integer orderType;
    private Timestamp createdTime;
    private Timestamp updateTime;

    @Id
    @Column(name = "id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "quota_id", nullable = false, length = 50)
    public String getQuotaId() {
        return quotaId;
    }

    public void setQuotaId(String quotaId) {
        this.quotaId = quotaId;
    }

    @Basic
    @Column(name = "contract_num", nullable = true, length = 100)
    public String getContractNum() {
        return contractNum;
    }

    public void setContractNum(String contractNum) {
        this.contractNum = contractNum;
    }

    @Basic
    @Column(name = "check_status", nullable = false, length = 11)
    public String getCheckStatus() {
        return checkStatus;
    }

    public void setCheckStatus(String checkStatus) {
        this.checkStatus = checkStatus;
    }

    @Basic
    @Column(name = "sc_name", nullable = true, length = 100)
    public String getScName() {
        return scName;
    }

    public void setScName(String scName) {
        this.scName = scName;
    }

    @Basic
    @Column(name = "permit", nullable = true, length = 20)
    public String getPermit() {
        return permit;
    }

    public void setPermit(String permit) {
        this.permit = permit;
    }

    @Basic
    @Column(name = "order_type", nullable = false)
    public Integer getOrderType() {
        return orderType;
    }

    public void setOrderType(Integer orderType) {
        this.orderType = orderType;
    }

    @Basic
    @Column(name = "created_time", nullable = true)
    public Timestamp getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Timestamp createdTime) {
        this.createdTime = createdTime;
    }

    @Basic
    @Column(name = "update_time", nullable = true)
    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TBoutiqueCallCheckModel that = (TBoutiqueCallCheckModel) o;

        if (id != that.id) return false;
        if (orderType != that.orderType) return false;
        if (quotaId != null ? !quotaId.equals(that.quotaId) : that.quotaId != null) return false;
        if (contractNum != null ? !contractNum.equals(that.contractNum) : that.contractNum != null) return false;
        if (checkStatus != null ? !checkStatus.equals(that.checkStatus) : that.checkStatus != null) return false;
        if (scName != null ? !scName.equals(that.scName) : that.scName != null) return false;
        if (permit != null ? !permit.equals(that.permit) : that.permit != null) return false;
        if (createdTime != null ? !createdTime.equals(that.createdTime) : that.createdTime != null) return false;
        if (updateTime != null ? !updateTime.equals(that.updateTime) : that.updateTime != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = (int) (id ^ (id >>> 32));
        result = 31 * result + (quotaId != null ? quotaId.hashCode() : 0);
        result = 31 * result + (contractNum != null ? contractNum.hashCode() : 0);
        result = 31 * result + (checkStatus != null ? checkStatus.hashCode() : 0);
        result = 31 * result + (scName != null ? scName.hashCode() : 0);
        result = 31 * result + (permit != null ? permit.hashCode() : 0);
        result = 31 * result + orderType;
        result = 31 * result + (createdTime != null ? createdTime.hashCode() : 0);
        result = 31 * result + (updateTime != null ? updateTime.hashCode() : 0);
        return result;
    }
}
